//
// Created by YxMin on 2024/7/4.
//
#include "UI.h"
#include "Element.h"
Element::Element(int uid,int x1,int y1,int x2,int y2,int radius,int(*callback)(void*)) {
    RECT r = {x1,y1,x2,y2};
    area = r;
    this->uid = uid;
    this->radius = radius;
    this->callback = callback;
    RegisterElement(this);
}
void Element::setDoubleClickCallback(int(*call)(void*)) {
    DoubleClickCallback = call;
    RegisterDoubleClick(this);
}
